package com.aya.transaction.mapper;

import com.aya.transaction.entity.Blog;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Service;
import tk.mybatis.mapper.common.Mapper;

public interface BlogMapper extends Mapper<Blog> {
    @Update("update trans_blog set content = #{content} where id = #{id}")
    int updateById(@Param("id") String id, @Param("content") String content);

    @Insert("insert into trans_blog (id,content)values(#{id},#{content})")
    int insertBlog(@Param("id") String id, @Param("content") String content);
    @Update("update trans_blog set content = #{content} where id = #{id}")
    int updateByIdErrorSql(@Param("id") String id, @Param("content") String content);


    @Select("select id,content from trans_blog where id = #{id}")
    Blog selectTransBlog(@Param("id") String id);
}
